<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org" xmlns:jbone="http://www.jbone.cn">
<head>

  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <meta name="description" th:content="${category.description}" />
  <meta name="keywords" th:content="${category.keywords}" />
  <meta name="author" content="" />

  <title th:text="${category.title} + ' - ' + ${settings.title}">CMS标题 - 未配置</title>
  <link rel="icon" th:href="@{/default/img/favicon.ico}" type="image/x-icon" />


</head>

<body class="parent-active" style="display: block;">

<div th:replace="/default/layout/css :: css"></div>
<link rel="stylesheet" th:href="@{/default/css/glyphicon.css}" />
<link rel="stylesheet" th:href="@{/default/css/special.css}" />
<div th:replace="/common/plugin :: globalPlugins"></div>


<aside class="left-sidebar">
  <jbone:advertisement location="special_menu_top"></jbone:advertisement>
  <div class="logo">
    <a href="#">
      <h1 th:text="${category.title}"></h1>
    </a>
  </div>
  <nav class="left-nav">
      <div id="tree"></div>
  </nav>
  <jbone:advertisement location="special_menu_bottom"></jbone:advertisement>
</aside>

<div id="main-wrapper">
  <header id="header" class="parent-active" th:replace="/default/layout/header :: header"></header>
  <jbone:advertisement location="special_article_top"></jbone:advertisement>
  <div class="content-header" th:if="${categoryToc != null}">
        <h1 th:text="${categoryToc.title}"></h1>
    </div>
  <div class="main-content post-content" th:if="${article != null && article.articleData != null}" th:utext="${article.articleData.content}">
    文章内容
  </div>
    <!-- 如果没有链接文章，则展示子栏目 -->
  <div class="main-content post-content" th:if="${article == null && categoryToc != null }">
    <ul th:if="${not #lists.isEmpty(categoryToc.children)}">
      <li th:each="cate,cateStat : ${categoryToc.children}">
        <a th:href="@{/category/{categoryCode}/{categoryTocId}(categoryCode=${category.code},categoryTocId=${cate.id})}" th:text="${cate.title}"></a>
      </li>
    </ul>

  </div>
  <jbone:advertisement location="special_article_bottom"></jbone:advertisement>
  <div class="main-content" th:if="${categoryToc != null && article != null}">
    原创文章，转载请注明出处：<a th:href="@{/category/{categoryCode}/{categoryTocId}(categoryCode=${category.code},categoryTocId=${categoryToc.id})}" th:text="'jbone - ' + ${article.title}">文章标题</a>
  </div>
</div>



<script th:src="@{/default/js/vendor/jquery-2.2.4.min.js}"></script>
<script th:src="@{/defaultjs/popper.min.js}"></script>
<script th:src="@{/default/js/vendor/bootstrap.min.js}"></script>
<script th:src="@{/default/js/vendor/bootstrap-treeview.min.js}"></script>
<script th:src="@{/default/js/easing.min.js}"></script>
<script th:src="@{/default/js/hoverIntent.js}"></script>
<script th:src="@{/default/js/superfish.min.js}"></script>
<script th:src="@{/default/js/jquery.ajaxchimp.min.js}"></script>
<script th:src="@{/default/js/jquery.magnific-popup.min.js}"></script>
<script th:src="@{/default/js/jquery.tabs.min.js}"></script>
<script th:src="@{/default/js/jquery.nice-select.min.js}"></script>
<script th:src="@{/default/js/isotope.pkgd.min.js}"></script>
<script th:src="@{/default/js/waypoints.min.js}"></script>
<script th:src="@{/default/js/jquery.counterup.min.js}"></script>
<script th:src="@{/default/js/simple-skillbar.js}"></script>
<script th:src="@{/default/js/owl.carousel.min.js}"></script>
<script th:src="@{/default/js/mail-script.js}"></script>
<script type="text/javascript" th:src="@{/default/js/jquery.nav.js}"></script>
<script th:src="@{/default/js/main.js}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>

<script th:src="@{/default/js/common.js}"></script>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
      // SyntaxHighlighter.all();

    $(document).ready(function() {
        console.log( "ready!" );
        var treeData = JSON.parse('[[${specialTree}]]');
       //treeview 源码 https://github.com/jonmiles/bootstrap-treeview
        console.log( treeData);
        $('#tree').treeview({
            enableLinks: true,
            backColor: '#f3f3f3',
            selectedBackColor: '#8490ff',

            color: "#428bca",
            showBorder: false,
            data: treeData
        });

    });
    /*]]>*/
</script>
</body>

</html>
